import { type UserData } from "@/api/user/types/user"
export interface LoginRequestData {
  /** admin 或 editor  "admin" | "editor" */
  username: string
  /** 密码 */
  password: string
  /** 验证码 */
  code: string
  /** 记住我 */
  rememberMe?: boolean
}

export type LoginCodeResponseData = ApiResponseData<string>

export type LoginResponseData = ApiResponseData<{ token: string }>

export type UserInfoResponseData = ApiResponseData<{
  userId: number
  username: string
  user: UserData
  roles: string[]
}>
